﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ValidationGroupExample.aspx.cs"
    Inherits="Lesson01.ValidationGroupExample" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <asp:Label ID="lblStatus" Text="" runat="server" /><br />
        <asp:Label Text="Group 1" runat="server" />
        <asp:TextBox ID="txtGroup1" runat="server" />
        <asp:RequiredFieldValidator ErrorMessage="Group 1 Error" ControlToValidate="txtGroup1"
            runat="server" ValidationGroup="Group1" />
        <asp:Button Text="Group 1" runat="server" ValidationGroup="Group1" OnClick="Unnamed3_Click" />
        <br />
        <asp:Label ID="Label1" Text="Group 2" runat="server" />
        <asp:TextBox ID="txtGroup2" runat="server" />
        <asp:RequiredFieldValidator ID="RequiredFieldValidator1" ErrorMessage="Group 2 Error"
            ControlToValidate="txtGroup2" runat="server" ValidationGroup="Group2" />
        <asp:Button ID="Button1" Text="Group 2" runat="server" ValidationGroup="Group2" 
            onclick="Button1_Click" />
    </div>
    </form>
</body>
</html>
